<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>激活码管理</title>
<link href="<?php echo $_BASE_DIR?>css_v1/style.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $_BASE_DIR?>css_v1/select.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?php echo $_BASE_DIR?>js_v1/jquery.js"></script>
<script type="text/javascript" src="<?php echo $_BASE_DIR?>js_v1/jmw.js"></script>
<script type="text/javascript" src="<?php echo $_BASE_DIR?>js_v1/select-ui.min.js"></script>
<script type="text/javascript" src="<?php echo $_BASE_DIR?>js_v1/jquery.DatePicker.js"></script>

<script type="text/javascript">
$(document).ready(function(e) {
    $(".select1").uedSelect({
		width : 345			  
	});
	$(".select2").uedSelect({
		width : 167  
	});
	$(".select3").uedSelect({
		width : 80
	});
});
</script>



</head>

<body>

<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="<?php echo url("leftmenu/bottom")?>">首页</a></li>
    <li><a href="#">激活码</a></li>
    </ul>
    </div>
 <form method="post" action="<?php echo url("activecode/index") ?>">
     <div style="clear: both;width:1100px;height:35px;line-height:35px;margin-bottom:5px;">
    <div class="rightinfo">	
<!--------------------------------------->	
	 <ul class="seachforms">
	        <li>
				<label>激活码：</label>
				<input type="text" name="active_code" class="scinputjmw" value="<?php echo isset($param['active_code'])?$param['active_code']:'';?>"/>				
			</li>
             <li>
				<label>所属报单中心姓名：</label>
				<input type="text" name="bdcenter_realname" class="scinputjmw" value="<?php echo isset($param['bdcenter_realname'])?$param['bdcenter_realname']:'';?>"/>				
			</li>
             <li>
				<label>所属报单中心手机号码：</label>
				<input type="text" name="acctname" class="scinputjmw" value="<?php echo isset($param['bdcenter_acctname'])?$param['bdcenter_acctname']:'';?>"/>				
			</li>
			<li>
				<label>激活用户手机号码：</label>
				<input type="text" name="used_acctname" class="scinputjmw" value="<?php echo isset($param['used_acctname'])?$param['used_acctname']:'';?>"/>				
			</li>
         </ul>
        </div>
         </div>

         <div style="clear: both;width:1100px;height:35px;line-height:35px;margin-bottom:5px;">
             <div class="rightinfo">
                 <!--------------------------------------->
                 <ul class="seachforms">
                 
			   
				 <li><label>使用状态</label>  
    <div class="vocation">
    <select name="used" class="select2">
	<option value=""  >请选择状态</option>
	<option value="0" <?php if(isset($param['used'])&& $param['used']==='0')  echo 'selected';else echo ''; ?>>未使用</option>
	<option value="1" <?php if(isset($param['used'])&& $param['used']==='1')  echo 'selected';else echo ''; ?>>已使用</option>
	</select>
    </div>
    </li>
    
    			 <li><label>选择批次</label>  
    <div class="vocation">
    <select name="applyid" class="select2">
	<option value=""  >请选择批次</option>
	<?php foreach ($apply_list as $k=>$v):?>
		<option value="<?php echo $k;?>" <?php echo isset($param['applyid'])?$param['applyid'] == $k?'selected':'':''; ?>><?php echo $v;?></option>
	<?php endforeach;?>
	</select>
    </div>
    </li>
    		
    		
    <li><label>激活时间：</label><input name="usedtime_timestart" id="usedtime_timestart" value="<?php echo isset($param['usedtime_timestart'])?$param['usedtime_timestart']:'';?>" type="text" class="scinputjmw" />---<input name="usedtime_timeend" id="usedtime_timeend" value="<?php echo isset($param['usedtime_timeend'])?$param['usedtime_timeend']:'';?>" type="text" class="scinputjmw" /></li>  
    <li><label>&nbsp;</label><input type="submit" class="scbtn" value="查询" style="width:60px;"/></li>
           
 
    </ul>
</div>
</div>
</form>	
    <div class="tools">
    
    	<ul class="toolbar">
        <li ><a href="<?php echo url("activecode/add")?>"><span><img src="<?php echo $_BASE_DIR?>images_v1/t01.png" /></span>添加</a></li>
      <!--  <li ><a href="#" onclick="editindex('bannerid','<?php echo url("activecode/add")?>/id/')"><span><img src="<?php echo $_BASE_DIR?>images_v1/t02.png" /></span>修改</a></li>
         --> 
        <li class="click"><a href="#" onclick="isDel('bannerid','<?php echo url("activecode/del")?>','ids[]')"><span><img src="<?php echo $_BASE_DIR?>images_v1/t03.png" /></span>删除</a></li>
         <li ><a href="<?php echo url("activecode/fileimport")?>"><span><img src="<?php echo $_BASE_DIR?>images_v1/t02.png" /></span>导入激活码</a></li>
        </ul>

	
    </div>
<!---------------------------------------------------------------------------- --> 	

		<script>
	$('#usedtime_timestart').datePicker({followOffset : [0, 24]});
	$('#usedtime_timeend').datePicker({followOffset : [0, 24]});
	</script>
<form action="" method="post" name="form">
	
    <table class="tablelist">

    	<thead>
    	<tr>
        <th width="5%"><input type="checkbox" value="on" name="chkall" onClick="CheckAll(this.form)"/></th>
        	
				<th width="20%" >激活码</th>
				<th width="10%" >所属报单中心</th>
				
				<th width="10%" >激活用户</th>
				<th width="10%" >使用状态</th>
				<th width="12%" >激活时间</th>
				<th width="10%" >操作</th>
        </tr>
        </thead>
        <tbody>
        <?php foreach ($item as $k=>$v):?>
        <tr>
        <td><input name="bannerid" id="bannerid" type="checkbox" value="<?php echo $v->id?>" /></td>
   			<td><?php echo h($v->active_code)?></td>
   			<td><?php echo h($v->bdcenter_realname);?></td>
			
			 <td><?php echo h($v->used_realname.'('.$v->used_acctname.')');?></td>
			 <td><?php echo $v->used == 0 ?'未使用':'已使用';?></td>
			<td><?php echo $v->usedtime ==0 ?'未激活':date('Y-m-d H:i:s',$v->usedtime);?></td>
				<td>
				<?php if($v->used == 0){?>
				<a style="color:blue;" href="<?php echo url("activecode/use",array('keyid'=>$v->id))?>">激活用户</a></td>
         <?php }else{?>
        已使用
         <?php }?>
        </tr> 
        <?php endforeach;?>
        
        </tbody>
    </table>
    
   </form>
 
    	<?php echo Q::control('pagination','pagination',array('url_args'=>$param,'pagination'=>$pagination,'show_count'=>1))?>
    </div>
  
    <script type="text/javascript">
	$('.tablelist tbody tr:odd').addClass('odd');
	</script>

</body>
<iframe id="excel" name="excel" width="0" height="0"></iframe>
</html>


